#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	int arr[110];
	for (int i = 1; i <= n; i++)
	{
		cin >> arr[i];
	}
	for (int i = 2; i <= n; i++)
	{
		if (arr[i] < arr[i - 1])
		{
			arr[0] = arr[i];
			int j = 0;
			for (j = i - 1; arr[0] < arr[j]; j--)
			{
				arr[j + 1] = arr[j];
			}
			arr[j + 1] = arr[0];
		}
	}
	for (int i = 1; i <= n; i++)
	{
		cout << arr[i] << " ";
	}
	cout << endl;
	return 0;
}